<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>

<div class="main-container">
<div class="col-mb-12 col-8" id="main" role="main">
    <div class="archive-header">
        <div class="archive-icon">
            <?php if ($this->is('category')): ?>
                <i class="fas fa-folder"></i>
            <?php elseif ($this->is('tag')): ?>
                <i class="fas fa-tag"></i>
            <?php elseif ($this->is('author')): ?>
                <i class="fas fa-user"></i>
            <?php else: ?>
                <i class="fas fa-archive"></i>
            <?php endif; ?>
        </div>
        
        <h3 class="archive-title">
            <?php $this->archiveTitle([
                'category' => _t('分类 %s 下的文章'),
                'search'   => _t('包含关键字 %s 的文章'),
                'tag'      => _t('标签 %s 下的文章'),
                'author'   => _t('%s 发布的文章')
            ], '', ''); ?>
        </h3>
        
        <?php if ($this->is('category')): ?>
            <div class="archive-description">
                <?php echo $this->getDescription(); ?>
            </div>
        <?php endif; ?>
        
        <div class="archive-meta">
            <span class="archive-post-count">
                <i class="fas fa-file-alt"></i>
                <?php echo $this->getTotal(); ?> 篇文章
            </span>
        </div>
    </div>

    <?php if ($this->have()): ?>
        <?php while($this->next()): ?>
            <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
                <?php if($this->fields->banner): ?>
                <div class="post-banner">
                    <a href="<?php $this->permalink() ?>">
                        <img src="<?php echo $this->fields->banner; ?>" alt="<?php $this->title() ?>">
                    </a>
                </div>
                <?php endif; ?>
                
                <div class="post-content-wrapper">
                    <h2 class="post-title" itemprop="name headline">
                        <a itemtype="url" href="<?php $this->permalink() ?>">
                            <?php $this->title() ?>
                        </a>
                    </h2>
                    
                    <ul class="post-meta">
                        <li itemprop="author">
                            <i class="fas fa-user"></i>
                            <a href="<?php $this->author->permalink(); ?>"><?php $this->author(); ?></a>
                        </li>
                        <li>
                            <i class="fas fa-calendar"></i>
                            <time datetime="<?php $this->date('c'); ?>"><?php $this->date('Y-m-d'); ?></time>
                        </li>
                        <li>
                            <i class="fas fa-folder"></i>
                            <?php $this->category(','); ?>
                        </li>
                        <li>
                            <i class="fas fa-comments"></i>
                            <a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('暂无评论', '1 条评论', '%d 条评论'); ?></a>
                        </li>
                    </ul>
                    
                    <div class="post-excerpt" itemprop="articleBody">
                        <?php
                        if ($this->fields->summary) {
                            echo $this->fields->summary;
                        } else {
                            $this->excerpt(150, '...');
                        }
                        ?>
                    </div>
                    
                    <div class="post-more">
                        <a href="<?php $this->permalink() ?>" class="btn">
                            阅读全文 <i class="fas fa-angle-right"></i>
                        </a>
                    </div>
                </div>
            </article>
        <?php endwhile; ?>
    <?php else: ?>
        <article class="post">
            <h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
            <div class="no-content">
                <i class="fas fa-inbox"></i>
                <p><?php _e('该分类下暂无内容'); ?></p>
            </div>
        </article>
    <?php endif; ?>

    <?php $this->pageNav(
        '<i class="fas fa-angle-left"></i>',
        '<i class="fas fa-angle-right"></i>',
        1,
        '...',
        array(
            'wrapTag' => 'ul',
            'wrapClass' => 'page-navigator',
            'itemTag' => 'li',
            'textTag' => 'span',
            'currentClass' => 'current',
            'prevClass' => 'prev',
            'nextClass' => 'next'
        )
    ); ?>
</div>
</div>

<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>

</```
rewritten_file>